<script setup lang="ts">
import { ref } from 'vue';

const age = ref(30)
const person = ref({ name: '张三', age: 18 })
const changeAge = () => {
  person.value.age++
}

</script>

<template>
  <div class="app-page">
    <div>{{ age }}</div>
    <div>姓名: {{ person.name }}, 年龄: {{ person.age }}</div>
    <button @click="changeAge">改年龄</button>
  </div>
</template>

<style lang="css" scoped></style>
